package 重载和重写;

public class Overwriting {
    public static void main(String[] args) {
        //System.out.println(3^7);
    }
}

class dog{
    public dog create(){
        System.out.println("dog");
        return new dog();
    }
}

class smallDog extends dog{
    @Override
    public smallDog create() {
        System.out.println("smallDog");
        return new smallDog();
    }
}


